package com.jic.member.constant.enums;

/**
 * @author yinhaijun
 * @date: 2020/6/8
 */
public enum  TripStatusEnum {
    TO_BE_START(1, "待开始"),
    ON_GOING(2, "进行中"),
    END(3, "已结束"),
    CLOSED(4, "已关闭"),
    DRAFT(5, "草稿"),
    NO_EDIT_COMPLETE(6, "内置状态: 未编辑完成");

    private Integer code;

    private String message;

    TripStatusEnum(Integer code, String message){
        this.code = code;
        this.message = message;
    }

    public TripStatusEnum getByCode(Integer code){
        TripStatusEnum[] values = TripStatusEnum.values();
        for(TripStatusEnum value : values){
            if(value.getCode().equals(code)){
                return value;
            }
        }
        return null;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
